// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_MAILSERVER_CONFIG
// * CreateDate    : 2014-06-05 18:30:15
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:15
// * LastChanger   : 2014-06-05 18:30:15
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstMailserverConfigEntity : EntityBase
    {
        public MstMailserverConfigTable TableSchema
        {
            get
            {
                return MstMailserverConfigTable.Current;
            }
		}
		
		public MstMailserverConfigEntity()
        {

        }
		
		public MstMailserverConfigEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.IncomingIsSsl = Convert.ToInt32(CommonFunctions.ToObject(dr["INCOMING_IS_SSL"]));
			this.OutgoingIsSsl = Convert.ToInt32(CommonFunctions.ToObject(dr["OUTGOING_IS_SSL"]));
			this.AccType = Convert.ToInt32(CommonFunctions.ToObject(dr["ACC_TYPE"]));
			this.InServer = Convert.ToString(CommonFunctions.ToObject(dr["IN_SERVER"]));
			this.InPort = Convert.ToInt32(CommonFunctions.ToObject(dr["IN_PORT"]));
			this.InPortEnabled = Convert.ToInt32(CommonFunctions.ToObject(dr["IN_PORT_ENABLED"]));
			this.OutServer = Convert.ToString(CommonFunctions.ToObject(dr["OUT_SERVER"]));
			this.OutPort = Convert.ToInt32(CommonFunctions.ToObject(dr["OUT_PORT"]));
			this.OutPortEnabled = Convert.ToInt32(CommonFunctions.ToObject(dr["OUT_PORT_ENABLED"]));
			this.EncType = Convert.ToInt32(CommonFunctions.ToObject(dr["ENC_TYPE"]));
			this.OutgoingNeedsAuthentication = Convert.ToInt32(CommonFunctions.ToObject(dr["OUTGOING_NEEDS_AUTHENTICATION"]));
        }
		
		public MstMailserverConfigEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.IncomingIsSsl = Convert.ToInt32(CommonFunctions.ToObject(dr["INCOMING_IS_SSL"]));
			this.OutgoingIsSsl = Convert.ToInt32(CommonFunctions.ToObject(dr["OUTGOING_IS_SSL"]));
			this.AccType = Convert.ToInt32(CommonFunctions.ToObject(dr["ACC_TYPE"]));
			this.InServer = Convert.ToString(CommonFunctions.ToObject(dr["IN_SERVER"]));
			this.InPort = Convert.ToInt32(CommonFunctions.ToObject(dr["IN_PORT"]));
			this.InPortEnabled = Convert.ToInt32(CommonFunctions.ToObject(dr["IN_PORT_ENABLED"]));
			this.OutServer = Convert.ToString(CommonFunctions.ToObject(dr["OUT_SERVER"]));
			this.OutPort = Convert.ToInt32(CommonFunctions.ToObject(dr["OUT_PORT"]));
			this.OutPortEnabled = Convert.ToInt32(CommonFunctions.ToObject(dr["OUT_PORT_ENABLED"]));
			this.EncType = Convert.ToInt32(CommonFunctions.ToObject(dr["ENC_TYPE"]));
			this.OutgoingNeedsAuthentication = Convert.ToInt32(CommonFunctions.ToObject(dr["OUTGOING_NEEDS_AUTHENTICATION"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstMailserverConfigTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstMailserverConfigTable.C_ID)); }
            set { SetData(MstMailserverConfigTable.C_ID, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_IS_ACTIVE)); }
            set { SetData(MstMailserverConfigTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public int IncomingIsSsl
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_INCOMING_IS_SSL)); }
            set { SetData(MstMailserverConfigTable.C_INCOMING_IS_SSL, value); }
        }
		
        [DataMember]
        public int OutgoingIsSsl
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_OUTGOING_IS_SSL)); }
            set { SetData(MstMailserverConfigTable.C_OUTGOING_IS_SSL, value); }
        }
		
        [DataMember]
        public int AccType
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_ACC_TYPE)); }
            set { SetData(MstMailserverConfigTable.C_ACC_TYPE, value); }
        }
		
        [DataMember]
        public string InServer
        {
            get { return Convert.ToString(GetData(MstMailserverConfigTable.C_IN_SERVER)); }
            set { SetData(MstMailserverConfigTable.C_IN_SERVER, value); }
        }
		
        [DataMember]
        public int InPort
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_IN_PORT)); }
            set { SetData(MstMailserverConfigTable.C_IN_PORT, value); }
        }
		
        [DataMember]
        public int InPortEnabled
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_IN_PORT_ENABLED)); }
            set { SetData(MstMailserverConfigTable.C_IN_PORT_ENABLED, value); }
        }
		
        [DataMember]
        public string OutServer
        {
            get { return Convert.ToString(GetData(MstMailserverConfigTable.C_OUT_SERVER)); }
            set { SetData(MstMailserverConfigTable.C_OUT_SERVER, value); }
        }
		
        [DataMember]
        public int OutPort
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_OUT_PORT)); }
            set { SetData(MstMailserverConfigTable.C_OUT_PORT, value); }
        }
		
        [DataMember]
        public int OutPortEnabled
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_OUT_PORT_ENABLED)); }
            set { SetData(MstMailserverConfigTable.C_OUT_PORT_ENABLED, value); }
        }
		
        [DataMember]
        public int EncType
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_ENC_TYPE)); }
            set { SetData(MstMailserverConfigTable.C_ENC_TYPE, value); }
        }
		
        [DataMember]
        public int OutgoingNeedsAuthentication
        {
            get { return Convert.ToInt32(GetData(MstMailserverConfigTable.C_OUTGOING_NEEDS_AUTHENTICATION)); }
            set { SetData(MstMailserverConfigTable.C_OUTGOING_NEEDS_AUTHENTICATION, value); }
        }
		
		#endregion
	}
	
	
}	

